import java.util.Scanner;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-09-01
 * Time: 20:09
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("打印X形，请输入斜杠长度:");
            if (!sc.hasNextInt()) {  // 如果不是数字，退出循环
                break;
            }
            int l = sc.nextInt();
            for (int i = 0; i < l; i++) {
                for (int j = 0; j < l; j++) {
                    if (i == j || i + j == l - 1) {
                        System.out.print("*");
                    } else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }
}